package com.czk.consumer;

import com.czk.service.CallService;
import com.czk.utils.ProxyFactory;

import java.util.concurrent.TimeUnit;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/8/20 11:23
 */
public class Consumer {
    public static void main(String[] args) throws InterruptedException {
        // 拿到代理对象
        CallService callService = ProxyFactory.getProxy(CallService.class);
        // 调用
        String czk = callService.call("czk");
        TimeUnit.SECONDS.sleep(5);
        System.out.println(czk);
    }
}
